/*
 * To change this template, choose Tools | Templates
 * and open the template in the editor.
 */
package DA;

import BE.Curso;
import BE.Horario;
import java.util.List;
import org.hibernate.Query;
import org.hibernate.Session;

/**
 *
 * @author jmj
 */
public class CursoDA {
    public static List<Curso> FindAll(){
        Session hbsession = HUtil.getSessionFactory().openSession();
        try{
            Query query = hbsession.createQuery("FROM Curso");
            
            hbsession.close();
            
            return query.list();
            
            
        }catch(Exception ex){
            hbsession.close();
            return null;
        }
    }
    
     
    
}
